package aimis.dto.view;

import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.BeanUtils;
import aimis.domain.User;

@Getter
@Setter
public class UserView {
    public UserView(User user)
    {
        BeanUtils.copyProperties(user,this);
        setDepartmentId(user.getDepartment().getId());
        setDepartmentName(user.getDepartment().getName());
    }
    private Long id;
    private String name;
    private String loginName;
    private String password;
    private Long departmentId;
    private String departmentName;
}
